package com.yax.mickey.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yax.mickey.entity.OrderDetail;
import com.yax.mickey.service.OrderDetailService;
import com.yax.mickey.mapper.OrderDetailMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author yax
* @description 针对表【order_detail(订单详情信息表)】的数据库操作Service实现
* @createDate 2024-05-27 09:03:45
*/
@Service
public class OrderDetailServiceImpl extends ServiceImpl<OrderDetailMapper, OrderDetail>
    implements OrderDetailService{

    @Autowired
    OrderDetailMapper orderDetailMapper;

    @Override
    public List<OrderDetail> getAllOrderDetail() {
        return orderDetailMapper.getAllOrderDetail();
    }

    @Override
    public List<OrderDetail> getOrderDetailByOrderId(Integer orderId) {
        return orderDetailMapper.getOrderDetailByOrderId(orderId);
    }

    @Override
    public Integer addOrderDetail(OrderDetail orderDetail) {
        return orderDetailMapper.addOrderDetail(orderDetail);
    }

    @Override
    public void updateOrderDetail(OrderDetail orderDetail) {
        orderDetailMapper.updateOrderDetail(orderDetail);
    }

    @Override
    public void deleteOrderDetail(OrderDetail orderDetail) {
        orderDetailMapper.deleteOrderDetail(orderDetail);
    }
}




